<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<header>
	<c:choose>
		<c:when test="${ not sessionScope.isLogin }">
			<c:if test="${ sessionScope.isLogout }">
	   			<script>
	   				alert("로그아웃되었습니다.");
	   			</script>
   				<c:remove var="isLogout" scope="session" />
   				<c:remove var="userId" scope="session"/>
   				<c:remove var="userPw" scope="session"/>
   				
	   		</c:if>	
			<div id="loginNav">
				<ul id="qmenu">
					<li><a href="index.mvc">HOME</a></li>
					<li><a href="join.mvc">회원가입</a></li>									
					<li><a href="login.mvc"><button type="button" class="btn" id="loginBtn2" value="LOGIN"><div id="loginSt">LOGIN</div></button></a></li>
				</ul>
			</div>
		</c:when>

		<c:when test="${ sessionScope.isLogin }">
		<%
			String userid = (String)session.getAttribute("userId");
		%>
			<div id="loginNav">
				<ul id="qmenu">
					<li><a href="index.mvc">HOME</a></li>
					<li><a href="mypage.mvc?userid=${ userId }">마이페이지</a></li>
				<% if(userid.equals("ADMIN")){  %>
					<li onclick="win()"><a href="#">관리자페이지</a></li>
				<%} %>
					<li><a href="login.mvc?isLogin=true"><button type="button" class="btn btn-inverse" id="logoutBtn"><div id="logoutSt">LOGOUT</div></button></a></li>
				</ul>
			</div>
		</c:when>
	</c:choose>
<table>
	<tr>
		<td>
			<ul id="mainmenu">
			
				<li class="mainmenuli">
					<div id="menubg">
						<img src="img/menubg_fin.jpg"></a>
					</div>
				</li>
				<li class="mainlogo">
					<div id="logo">
						<a href="index.mvc"><img src="img/logo.jpg"></a>
					</div>
					<div id="menu_1">
						<a href="armyTip.mvc"><img src="img/menu01.jpg" id="tip" 
						onmouseover="showimg('menu01')" onmouseout="hideimg('menu01')"></a>
					</div>
					<div id="gubun1">
						<img src="img/gubun.jpg" />
					</div>
					<div id="menu_2">
						<a href="#"><img src="img/wego01.jpg" id="wego" 
						onmouseover="showimg('wego01')" onmouseout="hideimg('wego01')"></a>
					</div>
					<div id="gubun2">
						<img src="img/gubun.jpg" />
					</div>
					<div id="menu_3">
						<a href="#"><img src="img/freeboard.jpg" id="freebd" 
						onmouseover="showimg('freeboard')" onmouseout="hideimg('freeboard')"></a>
					</div>
					<div id="gubun3">
						<img src="img/gubun.jpg" />
					</div>
					<div id="menu_4">
						<a href="#"><img src="img/QnA01.jpg" id="qna" 
						onmouseover="showimg('QnA01')" onmouseout="hideimg('QnA01')"></a>
					</div>
				</li>
			</ul>
		</td>
	</tr>
</table>
			
	<script type="text/javascript">
		
		function win(){
			window.open('GwanPop.mvc','','width=1000,height=1000 scrollbars=yes' ); 
		};
	
	</script>
	
</header>

